Integrand size = 28, antiderivative size = 158 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3183, 3852, 8, 3181, 3556, 3212} \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^4(c+d x)}{4 b d} \]
[In]
[Out]
Rule 8
Rule 3181
Rule 3183
Rule 3212
Rule 3556
Rule 3852
Rubi steps \begin{align*} \text {integral}& = \frac {\sec ^4(c+d x)}{4 b d}-\frac {a \int \sec ^4(c+d x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^2} \\ & = \frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {\left (a \left (a^2+b^2\right )\right ) \int \sec ^2(c+d x) \, dx}{b^4}+\frac {\left (a^2+b^2\right )^2 \int \frac {\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^4}+\frac {a \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{b^2 d} \\ & = \frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\left (a^2+b^2\right )^2 \int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^5}+\frac {\left (a^2+b^2\right )^2 \int \tan (c+d x) \, dx}{b^5}+\frac {\left (a \left (a^2+b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{b^4 d} \\ & = -\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d} \\ \end{align*}
Time = 1.24 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.63 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {12 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))+3 b^4 \sec ^4(c+d x)-12 a b \left (a^2+2 b^2\right ) \tan (c+d x)+6 b^2 \left (a^2+b^2\right ) \tan ^2(c+d x)-4 a b^3 \tan ^3(c+d x)}{12 b^5 d} \]
[In]
[Out]
Time = 1.13 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.67
method | result | size |
derivativedivides | \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \tan \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )^{2} b}{2}+\tan \left (d x +c \right ) a \left (a^{2}+2 b^{2}\right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(106\) |
default | \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \tan \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )^{2} b}{2}+\tan \left (d x +c \right ) a \left (a^{2}+2 b^{2}\right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(106\) |
parallelrisch | \(\frac {48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )-48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-6 a^{2} b^{2}-9 b^{4}\right ) \cos \left (4 d x +4 c \right )-12 b^{4} \cos \left (2 d x +2 c \right )+\left (-24 a^{3} b -56 a \,b^{3}\right ) \sin \left (2 d x +2 c \right )+\left (-12 a^{3} b -20 a \,b^{3}\right ) \sin \left (4 d x +4 c \right )+6 a^{2} b^{2}+21 b^{4}}{12 b^{5} d \left (3+\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )\right )}\) | \(284\) |
norman | \(\frac {-\frac {2 \left (2 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{b^{3} d}+\frac {2 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b^{3} d}+\frac {2 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{3} d}-\frac {2 a \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{4} d}+\frac {2 a \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{b^{4} d}+\frac {2 a \left (9 a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d \,b^{4}}-\frac {2 a \left (9 a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d \,b^{4}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{b^{5} d}-\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5} d}-\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5} d}\) | \(345\) |
risch | \(\frac {-2 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-2 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+2 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-10 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+4 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+8 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-\frac {34 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{3}+2 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}-\frac {10 i a \,b^{2}}{3}}{b^{4} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{4}}{b^{5} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{4}}{b^{5} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b d}\) | \(398\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.16 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\cos \left (d x + c\right )^{2}\right ) + 3 \, b^{4} + 6 \, {\left (a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left (a b^{3} \cos \left (d x + c\right ) + {\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{12 \, b^{5} d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
\[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\int \frac {\sec ^{5}{\left (c + d x \right )}}{a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 462 vs. \(2 (152) = 304\).
Time = 0.24 (sec) , antiderivative size = 462, normalized size of antiderivative = 2.92 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\frac {2 \, {\left (\frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {{\left (9 \, a^{3} + 14 \, a b^{2}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {{\left (9 \, a^{3} + 14 \, a b^{2}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{b^{4} - \frac {4 \, b^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, b^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, b^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {b^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{5}} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{5}} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{5}}}{3 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.76 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} + 12 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) - 24 \, a b^{2} \tan \left (d x + c\right )}{b^{4}} + \frac {12 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}}}{12 \, d} \]
[In]
[Out]
Time = 25.69 (sec) , antiderivative size = 575, normalized size of antiderivative = 3.64 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\left (6\,a^3\,b+12\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,a^2\,b^2+12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (-18\,a^3\,b-28\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-12\,a^2\,b^2-12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (18\,a^3\,b+28\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (6\,a^2\,b^2+12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (-6\,a^3\,b-12\,a\,b^3\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (3\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-12\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+18\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,b^5\right )}-\frac {a^4\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+b^4\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+a^2\,b^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,4{}\mathrm {i}}{b^5\,d} \]
[In]
[Out]